<?php $this->load->view('config/header');?>
<h1>Picture <small>form entry</small></h1>
<ol class="breadcrumb">
  <li><a href="<?php echo site_url()?>home"><i class="icon-dashboard"></i> Dashboard</a></li>
  <li><a href="<?php echo site_url()?>album"><i class="icon-picture"></i> Album</a></li>
  <li><a href="<?php echo site_url()?>albumpicture/index/<?php echo @$album[0]['id_album']?>"><i class="icon-picture"></i> Picture</a></li>
  <li class="active"><i class="icon-file-alt"></i> Form <?php echo $mode; ?></li>
</ol>

<form class="form-horizontal" role="form" method="post" action="<?php echo site_url() ?>albumpicture/<?php echo $action; ?>" enctype="multipart/form-data">
	<input type="hidden" class="form-control" name="id_albumpic" value="<?php echo @$detail[0]['id_albumpic']?>">
	<input type="hidden" class="form-control" name="id_album" value="<?php echo @$album[0]['id_album']?>">
	<input type="hidden" class="form-control" name="date_albumpic" value="<?php echo @$detail[0]['date_albumpic']?>">

	<div class="form-group">
		<label for="nama_albumpic" class="col-lg-2 control-label">Name Picture</label>
		<div class="col-lg-6">
			<input type="text" class="form-control" name="nama_albumpic" value="<?php echo @$detail[0]['nama_albumpic']?>" >
		</div>
	</div>
	<div class="form-group">
		<label for="file_albumpic" class="col-lg-2 control-label">File Picture</label>
		<div class="col-lg-6">
			<?php if(@$detail[0]['file_albumpic'] == "" || @$detail[0]['file_albumpic'] == "0"):?>
				<input type="file" class="form-control" name="file_albumpic"></input>
			<?php else:?>
				<input type="text" class="form-control" name="file_albumpic" value="<?php echo @$detail[0]['file_albumpic']?>" readonly="readonly"/>
			<?php endif;?>
		</div>
	</div>
	<div class="form-group">
		<label for="description_albumpic" class="col-lg-2 control-label">Description Picture</label>
		<div class="col-lg-6">
			<textarea name="description_albumpic" class="form-control" cols="85" rows="5" style="resize:none"><?php echo @$detail[0]['description_albumpic']?></textarea>
		</div>
	</div>
	<div class="form-group">
		<div class="col-lg-offset-2 col-lg-10">
			<input type="submit" name="submit" value="Simpan" class="btn btn-primary"/>
			<a href="<?php echo site_url()?>albumpicture/index/<?php echo @$album[0]['id_album']?>" class="btn btn-primary">Batal</a>
		</div>
	</div>
</form>

<?php $this->load->view('config/footer');?>